#!/bin/bash
git status | grep "Your branch is up to date with"
if [ $? != 0 ]
then
    git pull origin master
fi
if [ $? != 0 ]
then
    echo ================continue?================
    read rd
fi
git add .
git status | grep "nothing to commit, working tree clean"
if [ $? != 0 ]
then
    git commit -a -m "script auto commit" && git push origin master
fi
echo "========done========"
sleep 1